package com.cloud.poetry.config.filter;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author mengxj
 */

@Component
public class ConfigFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest)servletRequest;
        String gateway = request.getHeader("gatewayKey");
//        if(!"gatewayToken".equals(gateway)){
//            return;
//        }
        request.getHeaderNames();
        filterChain.doFilter(servletRequest, servletResponse);
    }
}
